package com.hzdesk.media.koreabatchmatvector.fragment.fragment_view;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.hzdesk.media.koreabatchmatvector.R;
import com.hzdesk.media.koreabatchmatvector.config.RxBusUtil;
import com.hzdesk.media.koreabatchmatvector.fragment.fragment_contract.AboutContract;
import com.hzdesk.media.koreabatchmatvector.fragment.fragment_persenter.AboutPersenter;
import com.hzdesk.media.koreabatchmatvector.logic.view.DialogActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * Created by Administrator on 2018/6/22.
 * 杭州席媒科技有限公司  Developers  刘传华  15
 * 佛祖镇楼 bug辟易
 */

public class AboutFragment extends BaseFragment implements AboutContract.IAboutView {
    @BindView(R.id.fragment_my_about_iv_back)
    ImageView fragmentMyAboutIvBack;
    @BindView(R.id.fragment_my_about_iv_logo)
    ImageView fragmentMyAboutIvLogo;
    @BindView(R.id.fragment_my_about_tv_version)
    TextView fragmentMyAboutTvVersion;
    @BindView(R.id.fragment_my_about_ll_service)
    LinearLayout fragmentMyAboutLlService;
    @BindView(R.id.fragment_my_about_ll_copyright)
    LinearLayout fragmentMyAboutLlCopyright;
    @BindView(R.id.fragment_my_about_ll_new_version)
    LinearLayout fragmentMyAboutLlNewVersion;
    @BindView(R.id.fragment_my_about_ll_version)
    LinearLayout fragmentMyAboutLlVersion;
    @BindView(R.id.fragment_my_about_ll_about_deskmedia)
    LinearLayout fragmentMyAboutLlAboutDeskmedia;
    Unbinder unbinder;
    private AboutPersenter mAboutPersenter = new AboutPersenter(this);

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_my_about, container, false);
        unbinder = ButterKnife.bind(this, view);
        return view;
    }
    @OnClick({R.id.fragment_my_about_iv_back, R.id.fragment_my_about_iv_logo,
            R.id.fragment_my_about_ll_service, R.id.fragment_my_about_ll_copyright,
            R.id.fragment_my_about_ll_new_version, R.id.fragment_my_about_ll_version})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.fragment_my_about_iv_back:
                mAboutPersenter.oncliackBack();
                break;
            case R.id.fragment_my_about_iv_logo:
                break;
            case R.id.fragment_my_about_ll_service:
                break;
            case R.id.fragment_my_about_ll_copyright:
                break;
            case R.id.fragment_my_about_ll_new_version:
                break;
            case R.id.fragment_my_about_ll_version:
                break;
        }
    }

    @Override
    public void toDialogPager() {
        Intent intent =   new Intent(mcontext, DialogActivity.class);
        intent.putExtra("Dialog_viewpage_index", RxBusUtil.CHANGE_SET_FRAGMENT);
        startActivity(intent);
    }
}
